<div class="treeBox">
  <dx-text-box 
    mode="search" class="orgBoxText mb10" [(value)]="orgName" 
    (onEnterKey)="search()"
  >
  </dx-text-box>
  <ng-container *ngIf="visible">
    <dx-tree-view 
      height="90%"
      [dataSource]="orgSync"
      scrollDirection="both"
      dataStructure="plain" 
      keyExpr="id" 
      displayExpr="text" 
      parentIdExpr="parentId" 
      hasItemsExpr="isGroup"
      loadMode="raw"
      noDataText="暂无数据" 
      virtualModeEnabled="true"
      (onItemClick)="changeSelection($event)"
    >
    </dx-tree-view>
  </ng-container>
  <ng-container *ngIf="!visible">
    <dx-tree-view
      height="90%"
      [items]="orgItem"
      scrollDirection="both"
      dataStructure="plain" 
      keyExpr="id" 
      displayExpr="text" 
      parentIdExpr="parentId" 
      hasItemsExpr="isGroup"
      loadMode="raw"
      noDataText="暂无数据" 
      virtualModeEnabled="true" 
      (onItemClick)="changeSelection($event)"
    >
    </dx-tree-view>
  </ng-container>
  
</div>
<div align="right">
  <dx-button (onClick)="addOrg()" class="successBtn" type="success" text="确定"></dx-button>
</div>
<dx-load-panel
#loadPanel
shadingColor="rgba(0,0,0,0)"
[position]="{ of: '.treeBox' }"
[(visible)]="loadingVisible"
[showIndicator]="true"
[showPane]="true"
[shading]="true"
[closeOnOutsideClick]="false">
</dx-load-panel>
<!-- 
(onShown)="onShown()"
(onHidden)="onHidden()" -->
<!-- searchEnabled="true"  -->
  